const mongoose = require('mongoose');//引入mongoose
const completedTestSchema = new mongoose.Schema({

    // 类似
    score: String,
    test_id: {
        type: mongoose.SchemaTypes.ObjectId,
        ref:'testsModel'
    },
    user_id: {
        type: mongoose.SchemaTypes.ObjectId,
        ref:'usersModel'
    }
    
});

const completedTestModel = mongoose.model("completedTestModel", completedTestSchema, "completedTest");
module.exports = {completedTestModel};